import * as types from '@src/model/actionType';
import { combineReducers } from 'redux';

// 交易列表
const transactionState = {
  TotalCount: 2,
  GroupList: [{ Id: 1, TxId: 'asasd12', Sender: 'com', BlockHash: 'dasd', Timestamp: 1606669261 }],
};

function transactionList(state = transactionState, action) {
  switch (action.type) {
    case types.txList:
      return { ...state, ...action.payload };
    default:
      return state;
  }
}

const reducer = combineReducers({
  transactionList,
});

export default reducer;
